<?php

namespace addons\mental\controller;

use app\admin\model\xlzxinfo\Tags;
use think\Db;
use think\Cache;
use think\Log;

class Notice extends Base
{
    protected $noNeedLogin = ['list'];
    public function _initialize()
    {
        parent::_initialize();
        $this->model = new \app\admin\model\Notice;
    }
    
    

    /**
     *
     * 平台规则列表
     * @return void
     */
    public function list()
    {
        $where = [];
        $lsit = $this->model
            ->where($where)->order('id DESC')
            ->paginate();
        $this->success('请求成功', $lsit);
    }

    /*
     * 平台规则详情
     * */
    public function detail()
    {
        $id = $this->request->get('id');

        $data = $this->model
            ->where(['id'=>$id])
            ->find();
        if (!$data){
            $this->error('规则不存在');
        }
        $this->success('请求成功', $data);
    }
    

}
